<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
 <button>点击</button>
 <script>
    //动态创建
    var s = document.createElement('script')
    s.src = 'http://localhost:3000/s?wd=fun'
    document.body.appendChild(s)
 </script>   
 <script>
    function fun(q) {
        console.log(q)
    }
 </script>
</body>
</html>